package com.cloud.check.api.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.UUID;

@Table(name = "rec_check_item")
public class RecCheckItem {
    @Id
    @Column(name = "rec_id")
    private long recId;

    @Column(name = "task_num")
    private String taskNum;

    @Id
    @Column(name = "check_item_id")
    private int checkItemId;

    @Column(name = "check_item")
    private String checkItem;

    @Column(name = "check_result_id")
    private int checkResultId;

    @Column(name = "check_result")
    private String checkResult;

    @Column(name = "uuid")
    private String uuid;

    public long getRecId() {
        return recId;
    }

    public void setRecId(long recId) {
        this.recId = recId;
    }

    public String getTaskNum() {
        return taskNum;
    }

    public void setTaskNum(String taskNum) {
        this.taskNum = taskNum;
    }

    public int getCheckItemId() {
        return checkItemId;
    }

    public void setCheckItemId(int checkItemId) {
        this.checkItemId = checkItemId;
    }

    public String getCheckItem() {
        return checkItem;
    }

    public void setCheckItem(String checkItem) {
        this.checkItem = checkItem;
    }

    public int getCheckResultId() {
        return checkResultId;
    }

    public void setCheckResultId(int checkResultId) {
        this.checkResultId = checkResultId;
    }

    public String getCheckResult() {
        return checkResult;
    }

    public void setCheckResult(String checkResult) {
        this.checkResult = checkResult;
    }

    public String getUuid() {return uuid;}

    public void setUuid(String uuid) {
        if(uuid==null){
            this.uuid = UUID.randomUUID().toString().replace("-", "");
        }else {
            this.uuid = uuid;
        }
    }

}
